﻿#include "shape.h"

  
#define M_PI 3.14
// 圆的面积：πr²
double Circle::getArea() const {
    return M_PI * radius * radius;
}

// 圆的周长：2πr
double Circle::getPerimeter() const {
    return 2 * M_PI * radius;
}

// 文本绘制：打印圆的描述
void Circle::draw() const {
    cout << "圆形【" << getName() << "】：半径=" << radius
        << "，面积=" << getArea() << "，周长=" << getPerimeter() << endl;
}
